
package com.joysuch.wwyt.datadump.biz.model;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.zlg.common.datadump.annotation.DataDumpEntity;
import cn.zlg.common.datadump.annotation.DataDumpField;
import com.joysuch.wwyt.bp.entity.dsl.QBpDepart;
import com.joysuch.wwyt.bp.entity.dsl.QBpStorageTankArea;
import com.joysuch.wwyt.datadump.biz.convertor.ExportFindStorageTankAreaBindMonitorPoints;
import com.joysuch.wwyt.datadump.biz.convertor.ExportGetDepartNameByIdConvertor;
import com.joysuch.wwyt.datadump.biz.convertor.ExportYesNoConvertor;
import com.joysuch.wwyt.datadump.biz.query.BpStorageTankAreaDumpQueryBean;
import com.joysuch.wwyt.mh.entity.dsl.QMhMajorHazard;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

@DataDumpEntity(name = "bp-storage-tank-area-dump", entity = QBpStorageTankArea.class, exportQueryConditions = BpStorageTankAreaDumpQueryBean.class, businessName = "储罐区")
@Data
public class BpStorageTankAreaDumpBean {

    @Excel(name = "储罐区编号", width = 20)
    @DataDumpField(field = "code")
    @Length(max = 64)
    private String code;

    @Excel(name = "储罐区名称", width = 20)
    @DataDumpField(field = "name")
    private String name;

    @Excel(name = "责任部门名称", width = 20)
    @DataDumpField(field = "responsibleDept", referenceEntity = QBpDepart.class, referenceEntityField = "name")
    private String responsibleDeptName;

    @Excel(name = "上级责任部门名称", width = 20)
    @DataDumpField(field = "responsibleDept", referenceEntity = QBpDepart.class, referenceEntityField = "parentId", exportConvertors = {
            ExportGetDepartNameByIdConvertor.class })
    private String parentResponsibleDeptName;

    @Excel(name = "所处环境功能区", width = 20)
    @DataDumpField(field = "inFunctionArea")
    private String inFunctionArea;

    @Excel(name = "周边安全防护距离m", width = 20)
    @DataDumpField(field = "safeDistance")
    private Float safeDistance;

    @Excel(name = "储罐区面积㎡", width = 20)
    @DataDumpField(field = "area")
    private Float area;

    @Excel(name = "有无围堰", width = 20)
    @DataDumpField(field = "hasCofferdam", exportConvertors = ExportYesNoConvertor.class)
    private String hasCofferdam;

    @Excel(name = "围堰所围面积㎡", width = 20)
    @DataDumpField(field = "cofferdamArea")
    private Float cofferdamArea;

    @Excel(name = "储罐个数", width = 20)
    @DataDumpField(field = "tankCount")
    private Integer tankCount;

    @Excel(name = "储存物质", width = 20)
    @DataDumpField(field = "storeMaterial")
    private String storeMaterial;

    @Excel(name = "储罐区总容积m³", width = 20)
    @DataDumpField(field = "volume")
    private Float volume;

    @Excel(name = "常规储存量m³", width = 20)
    @DataDumpField(field = "nomalStorage")
    private Float nomalStorage;

    @Excel(name = "两罐间最小间距m", width = 20)
    @DataDumpField(field = "minDistance")
    private Float minDistance;

    @Excel(name = "有无消防通道", width = 20)
    @DataDumpField(field = "hasFireChannel", exportConvertors = ExportYesNoConvertor.class)
    private String hasFireChannel;

    @Excel(name = "装卸方式", width = 20)
    @DataDumpField(field = "loadMethod")
    private String loadMethod;

    @Excel(name = "装卸危险化学品种类", width = 20)
    @DataDumpField(field = "loadChemTypes")
    private String loadChemTypes;

    @Excel(name = "关联的监测点", width = 20)
    @DataDumpField(field = "id", exportConvertors = ExportFindStorageTankAreaBindMonitorPoints.class)
    private String bindedMonitorPointCodes;

    @Excel(name = "所属重大危险源", width = 20)
    @DataDumpField(field = "mhMajorHazard.id", referenceEntity = QMhMajorHazard.class, referenceEntityField = "name")
    private String majarHazardName;

    @Excel(name = "所属重大危险源编号", width = 20)
    @DataDumpField(field = "mhMajorHazard.id", referenceEntity = QMhMajorHazard.class, referenceEntityField = "code")
    private String majarHazardCode;

}
